package de.koller.worlders.engine.tiles.background;

import de.koller.oceanFramework.gl.util.ParticleTexture;
import de.koller.worlders.WSea;
import de.koller.worlders.WorldersRoot;

public class Background extends WSea {
	
	private static final float BACKGROUND_DEPTH = 0.1f;
	
	protected ParticleTexture texture;
//	protected ParticleTexture horizon;

	@Override
	protected void init() {
		super.init();
		
		texture = ParticleTexture.generate( WorldersRoot.D_WIDTH, WorldersRoot.D_HEIGHT );
		texture.clear( 0xffff00ff );
		texture.flush();
		
//		horizon = ParticleTexture.generate( 1024, 1024 );
//		horizon.clear( 0xff00ff00 );
//		horizon.flush();
	}

	public void renderBackground() {
		texture.draw2D( 0, 0, WorldersRoot.D_WIDTH, WorldersRoot.D_HEIGHT, BACKGROUND_DEPTH );
		
		//float oy = -350 - ( MapData.MAP_SIZE/2 + wroot.getTileMap().getOffsetY() ) * -15;
		//float ox = -( MapData.MAP_SIZE/2 + wroot.getTileMap().getOffsetX() ) * -15;
		//horizon.draw2D( ox, oy, 1024, 1024, BACKGROUND_DEPTH );
	}
	
}
